package org.JWCB.friend.controller.file;

import org.JWCB.common.core.domain.vo.R;
import org.JWCB.common.file.domain.OSSResult;
import org.JWCB.friend.service.file.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/file")
public class FileController {

    @Autowired
    private FileService fileService;
    @PostMapping("/avatar/upload")
    public R<OSSResult> avatarUpload(@RequestBody MultipartFile file) throws Exception {
        return R.ok(fileService.avatarUpload(file));
    }


}
